package com.why.jvm.hotspot.src.share.vm.oops.constants;

import lombok.Data;

/**
 * @author xiaoTian
 * @date 2022/7/22 14:47
 * @Description:
 */
@Data
public class ConstantMethodHandleInfo extends ConstantInfoBase{

    private int referenceKind;

    private int referenceIndex;

    private String getReferenceKindValue(){
        return getConstantPool().getConstantPoolMap().get(referenceKind).toString();
    }

    private String getReferenceValue(){
        return getConstantPool().getConstantPoolMap().get(referenceIndex).toString();
    }

    @Override
    public String toString() {
        return "ConstantMethodHandleInfo{" +
                "referenceKind=" + referenceKind +
                ", referenceIndex=" + referenceIndex +
                ",referenceKind=" + getReferenceKindValue() +
                ", referenceIndex=" + getReferenceValue() +
                '}';
    }
}
